import React from 'react';
import { Tabs } from 'antd';
import CreateReport from './createReport';
import ReceiveReport from './receiveReport';

const DataReport = () => {
  const tabList = [
    {
      title: '我创建的',
      component: CreateReport,
    },
    {
      title: '我接收的',
      component: ReceiveReport,
    },
  ];
  return (
    <Tabs style={{ width: '100%' }} defaultActiveKey='0' destroyInactiveTabPane>
      {tabList.map((item, index) => (
        <Tabs.TabPane tab={item.title} key={index.toString()}>
          <item.component />
        </Tabs.TabPane>
      ))}
    </Tabs>
  );
};

export default DataReport;
